<?php ob_start();
include("header.php"); 
print_r($_POST);

if(isset($_POST['business_url'])&&(!empty($_POST['business_url']))){ 
	$sql=mysql_query("INSERT INTO `my_business_page_url` SET `userid`='".$_SESSION['id']."' ,`cat_id`='".$_POST['cat_id']."',
															`url`='".mysql_real_escape_string($_POST['business_url'])."' ")or die(mysql_error());
	$id=mysql_insert_id();
	if($sql){
		$_SESSION['url_id']=$id;
		header("location:create_page_step1.php"); exit;
	}
}
?> 
<style>
label.error{ display:none;}
</style>
<!--Body Section start-->
<div class="body_div" style="margin: 0 auto; float:none;">
<div class="business_page_main">
 


<div class="business_url_main">
<h1> Business Page URL</h1>
<form action="" method="post" id="business_form" onsubmit="validate_url();">
<ul> 
    <li><div style="width: 215px;overflow: hidden;height: 30px;">
        <select name="cat_id" required>
        	<option value="">Select Category</option>
        	<?php $sql=mysql_query("SELECT * FROM `my_category` WHERE `status`=1")or die(mysql_error()); $i=1;
	  		while($row=mysql_fetch_array($sql)){
	 		?>
            <option value="<?php echo $row['id'];  ?>"><?php echo $row['name'];  ?></option>
            <?php }?>
        </select> 
        </div> 
    </li>
    <li>
        <input type="text" name="business_url" id="business_url"  value="Page Name" /> <br /> 
        <div id="msg" style="margin-top: 8px;">
            <div class="alerti">
            	Please select name after you can move in next screen
            </div>
        </div> 
    </li>
    <li><input type="submit"  value="Take a New Start"  />  </li>  
</ul>
</form>
<p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In quis felis mi.<br> Suspendisse in urna quisVestibulum ante ipsum primis in faucibu</p>
 
</div>

<div class="blank_black">
sdfsdfsd
</div>

</div>
<br clear="all" />
</div>
<!--Body Section end-->
<? include("footer.php");  ?>
